home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 4
/
Mac Giga-ROM 4.0 - 1993.toast
/
FILES
/
HYP
/
C-D
/
DiskManager2.cpt
/
DiskManager 2.0
/
background_5657.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
6KB
|
236 lines
-- background: 5657 from stack: in.0
-- bmap block id: 6485
-- flags: 4000
-- background id: 0
-- name:
----- HyperTalk script -----
on newStack
extend
end newStack
on extend
-- type "extend" into the message box and press return to make
-- three months worth of new cards.
if the name of this stack contains "stack ideas"
then
answer "Please make a new stack before extending it." with "OK"
else
answer "Make three months more of new cards?" with "OK" or "Cancel"
if it is "Cancel" then exit extend
go to last card of this background
put getStartDate() into start --what date to begin on
if start is "Cancel" then exit extend
put 60*60*24 into OneDay --seconds in a day
repeat with cnt = 1 to (365 div 4) --three months
put start into it --a copy
convert it to long date
put it into field "Date"
add OneDay to start
doMenu New Card
end repeat
convert start to long date --fix the last card
put start into field "Date"
end if
end extend
function getStartDate
-- end of stack or today, whichever is newer
get field "Date"
if it is empty then put the short date into it
convert it to seconds --so we can compare
put the short date into today
convert today to seconds
if today < 2587766400 then
answer "Set the Control Panel to today's date" with "OK"
return "Cancel"
end if
if it >= today then return it --calendar already beyond today
convert it to short date
answer "Start from which date?" with it or the short date or "Cancel"
if it is "Cancel" then return it
convert it to seconds
return it
end getStartDate
on openBackground
push recent card
end openBackground
-- part 11 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=12 top=262 right=320 bottom=150
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
visual effect iris close
go "Home"
end mouseUp
-- part 70 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=361 top=180 right=242 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Find
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set the userLevel to 3
if the userLevel < 3 then exit mouseUp
if the freeSize of this stack > 0 then domenu "compact stack"
set the userLevel to saveLevel
doMenu "Find..."
end mouseUp
-- part 75 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=359 top=256 right=321 bottom=505
-- title width / last selected line: 0
-- icon id / first selected line: 22308 / 22308
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Go To Card
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set the userLevel to 4
if the userLevel < 4 then exit mouseUp
if the freeSize of this stack > 0 then domenu "compact stack"
domenu "Last"
end mouseUp
-- part 91 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=13 top=102 right=165 bottom=152
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Add To Home
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
set the userLevel to 5
if the userLevel < 5 then exit mouseUp
answer "Install DiskManager button on Home card?" with "OK" or "Cancel"
if it is "Cancel" then
exit mouseUp
end if
set lockmessages to true
choose button tool
click at location of me
doMenu Copy Button
go home
doMenu Paste Button
set the name of button "add to home" to "DiskManager"
set loc of button "DiskManager" to 358,250
play harpsichord "ee c"
answer "Drag the new button to the desired location"
wait until the mouse is down
set hilite of button "DiskManager" to true
repeat until the mouse is up
set loc of button "DiskManager" to the mouseLoc
end repeat
set hilite of button "DiskManager" to false
set script of button "DiskManager" to empty
set script of button "DiskManager" to "on mouseUp" && return && "visual effect iris open" && return && "go to stack DiskManager" && return && "end mouseUp"
choose browse tool
go back
play harpsichord "ee c"
set lockmessages to false
set the userLevel to saveLevel
end mouseUp
-- part 92 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=363 top=105 right=165 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DiskManager Help
----- HyperTalk script -----
on mouseUp
go to card id 5334
end mouseUp
-- part 93 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=11 top=181 right=243 bottom=150
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Label Help
----- HyperTalk script -----
on mouseUp
go to card id 10208
end mouseUp
-- part 94 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=171 top=137 right=287 bottom=340
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Button
----- HyperTalk script -----
on mouseUp
SET THE VISIBLE OF CARD FIELD 1 TO NOT THE VISIBLE OF CARD FIELD 1
end mouseUp